package com.bit.cfdi.web.dao.impl;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.bit.cfdi.web.dao.DonatariaDAO;
import com.bit.cfdi.web.domain.Donataria;

@Repository
public class DonatariaDAOImpl extends HibernateDaoSupport implements DonatariaDAO {

	@Autowired public void init(final SessionFactory sessionFactory) {
		setSessionFactory(sessionFactory);
	}

	@Override 
	@Transactional public void save(Donataria cartaPorte) {
		getHibernateTemplate().saveOrUpdate(cartaPorte);
	}

}
